.print-template-designer {
  height: 100%;
  padding: 20px;
  background-color: #f5f5f5;

  .designer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    
    h2 {
      margin: 0;
      color: #333;
    }
  }

  .designer-container {
    display: flex;
    height: calc(100% - 60px);
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  }

  .preview-panel {
    flex: 1;
    padding: 20px;
    border-right: 1px solid #e6e6e6;

    .preview-header {
      font-size: 16px;
      font-weight: bold;
      margin-bottom: 20px;
      color: #333;
    }

    .preview-content {
      height: calc(100% - 40px);
      overflow: auto;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #f9f9f9;
      border: 1px dashed #ddd;
    }

    .template-preview {
      background-color: #fff;
      box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
      position: relative;
      overflow: hidden;
    }

    .template-component {
      position: absolute;
      padding: 5px;
      box-sizing: border-box;
      overflow: hidden;
      cursor: pointer;
      
      &:hover {
        box-shadow: 0 0 0 2px #409eff;
      }
      
      &.selected {
        box-shadow: 0 0 0 2px #67c23a;
      }
    }

    .preview-table {
      width: 100%;
      height: 100%;
      border-collapse: collapse;

      th, td {
        border: 1px solid #ddd;
        padding: 5px;
        text-align: center;
      }

      th {
        background-color: #f5f5f5;
      }
    }

    .barcode-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #f5f5f5;
      color: #666;
      font-family: monospace;
    }
  }

  .settings-panel {
    width: 380px;
    padding: 20px;
    overflow-y: auto;

    .el-tabs {
      height: calc(100% - 200px);
    }

    .section-title {
      font-size: 14px;
      font-weight: bold;
      margin: 20px 0 10px;
      color: #333;
    }

    .added-components {
      margin-top: 20px;
      border-top: 1px solid #e6e6e6;
      padding-top: 20px;

      .component-item {
        padding: 8px 15px;
        margin-bottom: 8px;
        background-color: #f5f7fa;
        border-radius: 4px;
        cursor: move;
        display: flex;
        justify-content: space-between;
        align-items: center;

        &:hover {
          background-color: #ebeff5;
        }

        &.is-selected {
          background-color: #ecf5ff;
          border-left: 3px solid #409eff;
        }

        .el-icon-close {
          color: #f56c6c;
          cursor: pointer;

          &:hover {
            color: darken(#f56c6c, 10%);
          }
        }
      }
    }
    
    .empty-tip {
      color: #999;
      text-align: center;
      margin-top: 50px;
    }
  }
}